HP Operations Manager for Windows

com.hp.openview.ib.api.jopc
Class JOpcMonValue


java.lang.Object
  |
  +--com.hp.openview.ib.api.jopc.JOpcObject
		|
		+--com.hp.openview.ib.api.jopc.JOpcMonValue
All Implemented Interfaces:
java.lang.Cloneable, JOpcApiDefinition

public class JOpcMonValue
extends JOpcObject

Provides a object oriented java class, corresponding to the HPOM API "Agent Monitor API". Most of the described behavior in this API documentation is very similar to the one provided by this class.

Native API description:

To use these functions, the managed node processes must be running.


Constructor Summary
JOpcMonValue()
          constructs a new JOpcMonValue
 
Method Summary
 void send()
          Submits a monitor value to the local HPOM monitor agent.
 void setMonValue(double aValue)
          Sets the Monitor value.
 void setMonVar(java.lang.String aValue)
          Sets Name of the monitored object..
 void setObject(java.lang.String aValue)
          Sets the Message object.
 void setOptionVar(java.lang.String aValue)
          Sets A string containing the optional parameters used for resolving the $OPTION variables by the monitor agent.
 

Constructor Detail

JOpcMonValue

public JOpcMonValue()
			 throws JOpcException
constructs a new JOpcMonValue
Method Detail

send

public void send()
		throws JOpcException
Submits a monitor value to the local HPOM monitor agent.

Native API description:
Use the function opcagtmon_send() to send a monitor value, created on the managed node, to its responsible manager. The message must be of type OPCDTYPE_MONITOR_MESSAGE. Only the message attributes Monitor Name, Monitor Value, Object and Option String are used in opcagtmon_send(). The API program must be run as user opc_op or root. If not, the customer program must set the user ID (setuid).

Throws:
JOpcException - if native method return != OPC_ERR_OK.
  JOpcException reasons (negative values):
  OPC_ERR_INVALID_INPARAM: mon_msg is NULL
						 mon_msg is not of type OPCDTYPE_MONITOR_MESSAGE
  OPC_ERR_OBJNAME_REQUIRED: attribute OPCDATA_MON_VAR not set
  OPC_ERR_NO_AGENT: agent is not running
  OPC_ERR_NO_MEMORY: out of memory
  OPC_ERR_WRONG_OPTION_VARS: attribute OPCDATA_OPTION_VAR not set correctly
 
or if a field contains an improper value, the exception reason is a positive value corresponding to the JOpcApiDefinition interface identifying the attribute name of the native api data structure.

setMonVar

public void setMonVar(java.lang.String aValue)
			 throws JOpcException
Sets Name of the monitored object..

setMonValue

public void setMonValue(double aValue)
				 throws JOpcException
Sets the Monitor value.

setOptionVar

public void setOptionVar(java.lang.String aValue)
				throws JOpcException
Sets A string containing the optional parameters used for resolving the $OPTION variables by the monitor agent. The string should have the format [<var>=<value>]* with <var> and <value> not containing spaces, equal signs ("="), open parens ("("), or closed parens (")").

setObject

public void setObject(java.lang.String aValue)
			 throws JOpcException
Sets the Message object.